package es.demo.repository;

import es.demo.po.StudentEsPO;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.Date;
import java.util.List;

/**
 * mapper接口继承baseMapper<PO>
 * XXRepository 接口继承ElasticsearchRepository<E,T>
 * E泛型表示持久化PO
 * T文档对象id类型
 */
public interface StudentEsRepository extends ElasticsearchRepository<StudentEsPO,String> {
    //自定义一个抽象方法
    List<StudentEsPO> findByProfile(String profile);
    //查询某个生日时间范围之内的 po
    List<StudentEsPO> findByBirthdayBetween(Date start, Date end);
}
